using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

using SchemaProvider;

namespace Sql2005SchemaProvider
{
    public class Sql2005ProcedureCodeProvider : ProcedureCodeProviderBase
    {
        public override string ToPropertyName(string parameterName)
        {
            if (string.IsNullOrEmpty(parameterName))
            {
                return CodeUtility.EmptyDataEntity;
            }

            if (parameterName.StartsWith("@"))
            {
                parameterName = parameterName.Remove(0, 1);
            }
            return CodeUtility.ToPascalCase(parameterName);
        }

        public override string MapClassName(string name)
        {
            name = CodeUtility.FilterOwner(name);
            return CodeUtility.ToPascalCase(name);
        }

        protected override string DBTypeToCSType(string dbType)
        {
            return SqlServerUtility.ToCSType(dbType);
        }
    }
}
